.sidebar role="tablist" aria-multiselectable="false" data-current-section=sidebar_current_section_class
  = link_to root_path, class: 'sidebar-logo' do
    = sidebar_logo_tag

  - cache(cache_key_for_sidebar) do
    = link_to dashboard_path(current_site), class: sidebar_link_class(:dashboard) do
      i.fa.fa-chart-bar
      span= t('.dashboard')

    - cache(cache_key_for_sidebar_pages) do
      = link_to '#collapsePages', data: { toggle: 'collapse' }, aria: { expanded: 'false', controls: 'collapsePages' }, class: sidebar_link_class(:pages) do
        i.far.fa-file-alt
        span= t('.pages')
        i.fa.fa-caret-down

      = render_pages

    - cache(cache_key_for_sidebar_content_types) do
      = render 'locomotive/shared/sidebar/content_types'

    = link_to content_assets_path(current_site), class: sidebar_link_class(:content_assets) do
      i.far.fa-images
      span= t('.assets')

    - if current_site.translations.count > 0
      = link_to translations_path(current_site), class: sidebar_link_class(:translations) do
        i.fa.fa-globe
        span= t('.translations')

    - if current_site.has_metafields?
      = link_to current_site_metafields_path(current_site), class: sidebar_link_class(:current_site_metafields) do
        i.fa class=current_site_metafields_ui[:icon]
        span= current_site_metafields_ui[:label]

    = link_to edit_current_site_path(current_site), class: sidebar_link_class(:current_site) do
      i.fas.fa-cogs
      span= t('.settings')

    - if policy(current_site).show_developers_documentation?
      = link_to developers_documentation_path(current_site), class: sidebar_link_class(:developers_documentation) do
        i.far.fa-file-code
        span= t('.developers')
